/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ins;

import java.util.ArrayList;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author diallo
 */
@WebService()
public class InscriptionWS {

    /**
     * Web service operation
     */
    static private List<String> memberList;
    public InscriptionWS(){
        this.memberList = new ArrayList<String>();
    }
    @WebMethod(operationName = "inscription")
    public String inscription(@WebParam(name = "nom")
    String nom) {
        if (!memberList.contains(nom)){
            memberList.add(nom);
            return "Inscription Reussie";
        }else
            return "Membre deja existant";
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "members")
    public List members() {
        
        return memberList;
    }


}
